package com.qding.park.manager.pojo.enums;

/**
  * @ClassName: BusyNameTypeEnum
  * @Description: 时间段类型
  * @author Comsys-Administrator
  * @date 2016年9月20日 下午6:00:55
  *
  */
public enum BusyNameTypeEnum {

	BUSY_TYPE_FSD(0,"分时段"),
	BUSY_TYPE_GFSD(1,"高峰时段"),
	BUSY_TYPE_FGFSD(2,"非高峰时段"),
	BUSY_TYPE_FGZR(3,"非工作日");
	
	private int code;
	
	private String desc;
	
	public static String fromInt(int code) {
		String str = "";
		switch (code) {
		case 0:
			str = BUSY_TYPE_FSD.getDesc();
			break;
		case 1:
			str = BUSY_TYPE_GFSD.getDesc();
			break;
		case 2:
			str = BUSY_TYPE_FGFSD.getDesc();
			break;
		case 3:
			str = BUSY_TYPE_FGZR.getDesc();
			break;
		default:
			str = "";
			break;
		}

		return str;
	}
	
	private BusyNameTypeEnum(int code,String desc){
		this.code=code;
		this.desc=desc;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	
}
